package com.econ.powercloud.ems.common.enums;

/**
 * @Author : zjf
 * @Description : 储能站类型
 * @Date : 2022/7/21 10:54
 * @Modified by : zjf
 */
public enum StationType implements EnumMethod{
    LOW_PRESSURE_CASCADE(0,"低压级联"),
    HIGH_PRESSURE_CASCADE(1, "高压级联"),
    ;

    private Integer code;
    private String desc;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    StationType(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getCodeFromCode(int code){
        for(StationType type: StationType.values()){
            if(type.getCode() == code){
                return type.getDesc();
            }
        }
        return null;
    }
}
